<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="css/style.css">
<script type="text/javascript" src="js/linkage.js"></script>
<script type="text/javascript" src="js/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="js/jquery.dataTable.min.js"></script>
<script type="text/javascript" src="js/bootstrap/bootstrap.min.js"></script>
<script type="text/javascript" src="js/underscore-min.js"></script>
<script type="text/javascript" src="js/controllers/buyCtrl.js"></script>
<script type="text/javascript" src="js/controllers/indexCtrl.js"></script>
</head>
<div class="bor_det_oner fl">
	<form class="well">
		<fieldset>
			<div style="width: 1000px; margin-bottom: 20px;">
				<label>证券代码</label> <input id="securNum" type="text"
					onblur="querySecuritiesName('buy')" 
					oninput="validSecurID('buy')"> <span id="securNumError"
					style="color: #f00;"></span>
				<div style="float: right; margin-rigth: 30px;">
					<label>证券名称</label> <input id="securName" type="text" readonly>
				</div>
			</div>
			<div style="width: 1000px; margin-bottom: 20px;">
				<label>转让方式</label> <input type="text" readonly value="协议转让">
				<div style="float: right; margin-rigth: 30px;">
					<label>申报类型</label> <input type="text" readonly value="互报成交确认买入">
				</div>
			</div>
			<div style="width: 1000px; margin-bottom: 20px;">
				<label>买入价格</label> <input type="text" id="price"
					oninput="validPrice('buy')" /> <span id="priceError"
					style="color: #f00;"></span>
				<div style="float: right; margin-rigth: 30px;">
					<label>买入数量</label> <input type="text" id="count"
						oninput="validCount('buy')" /> <span id="countError"
						style="color: #f00;"></span>
				</div>
			</div>
			<div style="width: 1000px; margin-bottom: 20px;">
				<label>约定号</label> <input type="text" id="appointmentNumber">
				<div style="float: right; margin-rigth: 30px;">
					<label>对方席位</label> <input type="text" id="seatOfTheOtherParty">
				</div>
			</div>
			<div style="width: 1000px; margin-bottom: 20px;">
				<label>对方股东</label> <input type="text" id="mutualShareholder">
			</div>
			<div style="width: 1000px;">
				<button type="button" id="submitBtn" class="bor_btn"
					onclick="validParam()" style="float: right;">确认买入</button>
			</div>
		</fieldset>
	</form>
</div>
<div class="lg_list_01"
	style="margin: 10px auto; width: 92%; height: 378px; overflow-y: auto; overflow-x: hidden;">
	<div style="width: 100%; height: 50px;">
		<label style="line-height: 40px; color: #333; font-size: 16px;">交易记录：</label>
		<button type="button" class="commonLink"
			style="float: right; width: 50px; height: 25px; margin-top: 12px;"
			onclick="refresh()">刷新</button>
	</div>
	<table class="historyTable">
		<thead>
			<tr>
				<td>单号</td>
				<td>数量</td>
				<td>交易时间</td>
				<td>账户</td>
				<td>价格</td>
				<td>状态</td>
				<td>证券号</td>
				<td>证券名称</td>
				<td>关联持仓流水号</td>
			</tr>
		</thead>
		<tbody id="displayData">

		</tbody>

	</table>
	<div id="buyNoData"></div>
	<div>
		共<span id="buyTotal"></span>页
		<button id="prePageBtn" class="commonLink" type="button"
			onclick="prePage()" style="margin: 0 5px 0 10px; padding: 0 5px;">上一页</button>
		<span>当前页：</span><span id="currentPage"></span>
		<button id="nextPageBtn" class="commonLink" type="button"
			onclick="nextPage()  " style="margin: 0 5px 0 5px; padding: 0 5px;">下一页</button>
	</div>
</div>
<script>
	queryHistory();
	queryUserInfo();
	function refresh() {
		queryHistory();
	}
</script>
</html>